# Edit following two lines to set component requirements (see docs)
set(COMPONENT_REQUIRES)
set(COMPONENT_PRIV_REQUIRES audio_sal audio_hal esp_dispatcher esp_peripherals display_service)

if(CONFIG_AUDIO_BOARD_CUSTOM)

if (CONFIG_MY_BOARD_V1_0)
message(STATUS "Current board name is " CONFIG_MY_BOARD_V1_0)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./my_board_v1_0 ./my_codec_driver)
set(COMPONENT_SRCS
./my_board_v1_0/board.c
./my_board_v1_0/board_pins_config.c
./my_codec_driver/new_codec.c
)
endif()

if (CONFIG_WCDLP_BOARD_V2_0)
message(STATUS "Current board name is " CONFIG_WCDLP_BOARD_V2_0)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./wcdbd_v2_0 ./es8311_wcdlp/)
set(COMPONENT_SRCS
./wcdbd_v2_0/board.c
./wcdbd_v2_0/board_pins_config.c
./es8311_wcdlp/my_es8311.c
)
endif()

if (CONFIG_WISTETHO3_BOARD_V1_0)
message(STATUS "Current board name is " CONFIG_WISTETHO3_BOARD_V1_0)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./iStetho3bd_v1_0 ./es8311_iStetho)
set(COMPONENT_SRCS
./iStetho3bd_v1_0/board.c
./iStetho3bd_v1_0/board_pins_config.c
./es8311_iStetho/my_es8311.c
)
endif()

if (CONFIG_ISTETHO2_BOARD_V1_3)
message(STATUS "Current board name is " CONFIG_ISTETHO2_BOARD_V1_3)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./iStetho2bd_v1_3)
set(COMPONENT_SRCS
./iStetho2bd_v1_3/board.c
./iStetho2bd_v1_3/board_pins_config.c
./es8388a1s/es8388a1s.c
)
endif()


endif()

register_component()

IF (IDF_VERSION_MAJOR GREATER 3)
idf_component_get_property(audio_board_lib audio_board COMPONENT_LIB)
set_property(TARGET ${audio_board_lib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${COMPONENT_LIB})

ELSEIF (IDF_VERSION_MAJOR EQUAL 3)
set_property(TARGET idf_component_audio_board APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES  $<TARGET_PROPERTY:${COMPONENT_TARGET},INTERFACE_INCLUDE_DIRECTORIES>)

ENDIF (IDF_VERSION_MAJOR GREATER 3)
